package com.lening.iot.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lening.common.base.BaseController;
import com.lening.iot.dto.AccontrolDTO;
import com.lening.iot.dto.InreadDTO;
import com.lening.iot.po.InreadPO;
import com.lening.iot.service.InreadService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.reactive.function.client.WebClient;

import java.util.List;

/**
 * @ToDo:
 * @Author：李忠达
 * @date: 2024/6/4 14:58
 */
@RestController
@RequestMapping("/inreads")
public class InreadController extends BaseController<InreadPO, InreadDTO, InreadService> {

    @Autowired(required = false)
    private WebClient webClient;

    @Autowired
    private InreadService inreadService;
    @GetMapping("/getAllInr")
    public Page<InreadDTO> getAllAcl(Page<InreadDTO> inreadDTOPage){
        Page<InreadDTO> inrList = inreadService.getAllInr(inreadDTOPage);
        return inrList;
    }

//    @Override
//    @GetMapping("page")
//    public Page<?> page(InreadDTO inreadDTO) {
//        return inreadService.getAllInr(inreadDTO);
//    }
@GetMapping("/getAll")
public List<InreadDTO> getAll(String communityName) {
return inreadService.getAll(communityName);
}
}
